package ibmetp.mis.controller.dept;

import ibmetp.mis.service.DeptService;
import ibmetp.mis.serviceImpl.DeptServiceImpl;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class DeptDelServlet
 */
public class DeptDelServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public DeptDelServlet() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#service(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		System.out.println("Calling DeptDelServlet..");
		//用户Id数组
		String deptIds=request.getParameter("deptId");
		System.out.println(deptIds);
		
		//删除用户
		if(deptIds!=null){
		System.out.println("Del deptIds:"+deptIds);
		DeptService ds=new DeptServiceImpl();
		ds.deleteDeptByIds(deptIds);		
		}
	}

}
